<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .character {
      width: 151px;
      height: 291px;
      background: url("./boy.png") -0px -291px no-repeat;
      position: absolute;
      left: 6%;
      top: 55%;
    }

    .slowWalk {
      -webkit-animation-name: person-slow;
      -webkit-animation-duration: 950ms;
      -webkit-animation-iteration-count: infinite;
      -webkit-animation-timing-function: steps(1, start);
      -moz-animation-name: person-slow;
      -moz-animation-duration: 950ms;
      -moz-animation-iteration-count: infinite;
      -moz-animation-timing-function: steps(1, start);
    }

    /* 普通慢走 */

    @-webkit-keyframes person-slow {
      0% {
        background-position: -0px -291px;
      }

      25% {
        background-position: -602px -0px;
      }

      50% {
        background-position: -302px -291px;
      }

      75% {
        background-position: -151px -291px;
      }

      100% {
        background-position: -0px -291px;
      }
    }

    @-moz-keyframes person-slow {
      0% {
        background-position: -0px -291px;
      }

      25% {
        background-position: -602px -0px;
      }

      50% {
        background-position: -302px -291px;
      }

      75% {
        background-position: -151px -291px;
      }

      100% {
        background-position: -0px -291px;
      }
    }

    .pauseWalk {
      -webkit-animation-play-state: paused;
      -moz-animation-play-state: paused;
    }
  </style>
</head>

<body>
  <div id="boy" class="character slowWalk">
</body>

<script>
</script>

</html>